
var order_manage_tradeService = {
    search: function (config, callback) {
        if (config.userType === 1) {
            Api.get('order_manage_trade.getOrderListSale', config, callback);
        }
        if (config.userType === 2) {
            Api.get('order_manage_trade.getOrderListPurchase', config, callback);
        }
    },
    // 获取订单状态
    getOrderStatus: function (param, callback) {
        Api.get('order_manage_trade.getOrderStatus', { seatParams: param }, callback);
    },
    // 获取主账号下的子账号
    getSubAccount: function (param, callback) {
        Api.get('order_manage_trade.getSubAccount', { urlParams: param }, callback);
    },
    // 根据关键字搜索子账号
    searchSubAccount: function (param, callback) {
        Api.get('order_manage_trade.searchSubAccount', { urlParams: param }, callback);
    },
    // 获取商品类型
    getGoodsType: function (param, callback) {
        Api.get('order_manage_trade.getGoodsType', { urlParams: param }, callback);
    },
    // 获取商品
    searchGoodsNo: function (param, callback) {
        Api.get('order_manage_trade.searchGoodsNo', { urlParams: param }, callback);
    },
    getPlat: function (callback) {
        Api.get('order_manage_trade.getPlat', callback);
    },
    // 获取订单明细
    getOrdersDetail: function (param, callback) {
        Api.post('order_manage_trade.getOrdersDetail', { urlParams: param }, callback);
    },
    // 删除订单
    deleteOrders: function (param, callback) {
        Api.post('order_manage_trade.deleteOrders', { urlParams: param }, callback);
    },
    // 提交订单
    submitOrders: function (param, callback) {
        Api.post('order_manage_trade.submitOrders', { urlParams: param }, callback);
    },
    // 确认订单
    confirmOrders: function (param, callback) {
        Api.post('order_manage_trade.confirmOrders', { urlParams: param }, callback);
    },
    // 发货
    deliverOrders: function (param, callback) {
        Api.post('order_manage_trade.deliverOrders', { urlParams: param }, callback);
    },
};
module.exports = order_manage_tradeService;
